package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_user_friend_setting;

//DAO
public interface U_user_friend_settingMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_USER_FRIEND_SETTING  WHERE ID = #{id}")
	public ApiU_user_friend_setting findU_user_friend_settingById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_user_friend_setting")
	public List<ApiU_user_friend_setting> findU_user_friend_settings();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_user_friend_settingsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_USER_FRIEND_SETTING (USER_ID, IS_OPEN, TYPE, IS_TOP, IS_NOINTERRUPT, IS_NEGLECTNOREAD, IS_SENDDEL, IS_RECEIVEDEL,is_readdynamic) VALUES (#{user_id}, #{is_open}, #{type}, #{is_top}, #{is_nointerrupt}, #{is_neglectnoread}, #{is_senddel}, #{is_receivedel},#{is_readdynamic})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_user_friend_setting(ApiU_user_friend_setting u_user_friend_setting);

	// 修改
	@Update("UPDATE U_USER_FRIEND_SETTING SET USER_ID = #{user_id}, IS_OPEN = #{is_open}, TYPE = #{type}, IS_TOP = #{is_top}, IS_NOINTERRUPT = #{is_nointerrupt}, IS_NEGLECTNOREAD = #{is_neglectnoread}, IS_SENDDEL = #{is_senddel}, IS_RECEIVEDEL = #{is_receivedel}, conn_id = #{conn_id},is_readdynamic = #{is_readdynamic} WHERE ID = #{id}")
	public int updateU_user_friend_setting(ApiU_user_friend_setting u_user_friend_setting);

	// 删除
	@Delete("DELETE FROM U_USER_FRIEND_SETTING  WHERE ID = #{id}")
	public int deleteU_user_friend_setting(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
